<?php
require("conn.php");
$sql="SELECT * FROM banchoixito";
$bang=mysql_query($sql);
?>
<table width="1324" height="653" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="175" height="647"><table width="200" height="634" border="0" cellpadding="0" cellspacing="0" style="border:outset;border-width:+7;background-image:url(hinh/3.jpg);border-color:#FFFFCC">
          <tr>
            <td>&nbsp;</td>
          </tr>
      </table></td>
      <td width="959"><table width="914" height="634" border="0" align="center" cellpadding="0" cellspacing="0" style="border:outset;border-width:+7;border-color:#FFFFCC">
          <tr>
            <td width="917" align="center" valign="top" class=""="noidung"><div align="center">
              <table width="833" border="0" cellpadding="4" cellspacing="4">
                <tr>
                  <td colspan="4">Danh sach bang bai </td>
                </tr>
				<?php
				   while($row=mysql_fetch_array($bang))
  					{
					
				  ?>
                <tr>
                  <td width="202">
				  
				  <table width="202" height="128" border="0" style="border-style:outset;border-width:+2;border-color:#FFCCCC" background="hinh/3.jpg">
                    <tr>
                      <td width="62" height="34" onclick="choibai()"><?php 
					  $g1=$row["nguoi1"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g1'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                      <td width="57">&nbsp;</td>
                      <td width="61"><?php 
					  $g2=$row["nguoi2"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g2'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                    </tr>
                    <tr>
                      <td height="47">&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td><?php 
					  $g4=$row["nguoi4"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g4'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                      <td width="57">&nbsp;</td>
                      <td><?php 
					  $g3=$row["nguoi3"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g3'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                    </tr>
                  </table></td>
                  <td width="202">
				  <?php 
				  if($row=mysql_fetch_array($bang))
				  {
				  ?>
				  <table width="202" height="128" border="0" style="border-style:outset;border-width:+2;border-color:#FFCCCC" background="hinh/3.jpg">
                    <tr>
                      <td width="62" height="34"><?php 
					  $g1=$row["nguoi1"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g1'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                      <td width="57">&nbsp;</td>
                      <td width="61"><?php 
					  $g2=$row["nguoi2"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g2'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                    </tr>
                    <tr>
                      <td height="47">&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td><?php 
					  $g4=$row["nguoi4"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g4'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                      <td width="57">&nbsp;</td>
                      <td><?php 
					  $g3=$row["nguoi3"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g3'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                    </tr>
                  </table>
				  <?php 
				  }
				  ?></td>
                  <td width="202">
				  <?php 
				  if($row=mysql_fetch_array($bang))
				  {
				  ?>
				  <table width="202" height="128" border="0" style="border-style:outset;border-width:+2;border-color:#FFCCCC" background="hinh/3.jpg">
                    <tr>
                      <td width="62" height="34"><?php 
					  $g1=$row["nguoi1"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g1'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                      <td width="57">&nbsp;</td>
                      <td width="61"><?php 
					  $g2=$row["nguoi2"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g2'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                    </tr>
                    <tr>
                      <td height="47">&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td><?php 
					  $g4=$row["nguoi4"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g4'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                      <td width="57">&nbsp;</td>
                      <td><?php 
					  $g3=$row["nguoi3"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g3'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                    </tr>
                  </table>
				  <?php 
				  }
				  ?>
				  </td>
                  <td width="199">
				  <?php 
				  if($row=mysql_fetch_array($bang))
				  {
				  ?>
				  <table width="202" height="128" border="0" style="border-style:outset;border-width:+2;border-color:#FFCCCC" background="hinh/3.jpg">
                    <tr>
                      <td width="62" height="34"><?php 
					  $g1=$row["nguoi1"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g1'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                      <td width="57">&nbsp;</td>
                      <td width="61"><?php 
					  $g2=$row["nguoi2"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g2'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                    </tr>
                    <tr>
                      <td height="47">&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td><?php 
					  $g4=$row["nguoi4"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g4'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                      <td width="57">&nbsp;</td>
                      <td><?php 
					  $g3=$row["nguoi3"];
					$bangs=mysql_query("SELECT * FROM `thanh_vien` where username='$g3'");
					$rows=mysql_fetch_array($bangs);
					  echo($rows["ten"]);?></td>
                    </tr>
                  </table>
				  <?php 
				  }
				  ?>
				  </td>
                </tr>
				<?php 
				}
				?>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
              </table>
            <p>&nbsp;</p></td>
          </tr>
      </table></td>
      <td width="168"><table width="200" height="634" border="0" cellpadding="0" cellspacing="0" style="border:outset;border-width:+7;background-image:url(hinh/3.jpg);border-color:#FFFFCC">
          <tr>
            <td>&nbsfdsfp;</td>
          </tr>
      </table></td>
    </tr>
  </table>
